Classifications of MCI Commands

MCI defines four command classifications: system, required, basic, and extended. The following list describes these command classifications:

    System commands are handled by MCI directly, rather than by the driver.

    Required commands are handled by the driver. All MCI drivers must support the required commands and flags.

    Basic commands (or optional commands) are used by some devices. If a device supports a basic command, it must support a defined set of flags for that command.

    Extended commands are specific to a device type or driver. Extended commands include commands, like the put1KTN_TS (MCI_PUTBO5B3C) and where4V_3I1 (MCI_WHEREM3KM0X) commands for the digitalvideo and overlay device types, and extensions to existing commands (like the  stretch  flag of the status3L25TX (MCI_STATUSCTUPE8) command for the overlay device type).

 

While system and required commands are the minimum command set for any MCI driver, basic and extended commands are not supported by all drivers. Your application can always use system and required commands and their flags, but if it needs to use a basic or extended command or flag, it should first query the driver by using the capability14PJB2D (MCI_GETDEVCAPS8A0P0PJ) command. The following sections summarize the specific commands in each category.

System Commands

MCI processes the following system commands directly, rather than passing them to MCI devices.

String

Message

Description

break4AG387

MCI_BREAKLIULU3

Sets a break key for an MCI device.

sysinfo6RJD.J

MCI_SYSINFO.1AK5X

Returns information about MCI devices.

 

Required Commands

All MCI devices support the following required commands.

String

Message

Description

capability14PJB2D

MCI_GETDEVCAPS8A0P0PJ

Obtains the capabilities of a device.

close4BA_J1

MCI_CLOSE42N5TZR

Closes the device.

infoUDBQFA

MCI_INFO1OO.7GB

Obtains textual information from a device.

open1GMTS1P

MCI_OPEN12F69Z1

Initializes the device.

status3L25TX

MCI_STATUSCTUPE8

Obtains status information from the device. Some of this command s flags are not required, so it is also a basic command.

 

Devices must also support a standard set of command flags for the required commands.

Basic Commands

The following list summarizes the basic commands. The use of these commands by an MCI device is optional.

String

Message

Description

loadUDERA6

MCI_LOAD12F38UR

Loads data from a file.

pause4O6CJ1

MCI_PAUSE42ZUZZR

Stops playing. Playback or recording can be resumed at the current position.

playUDIOAK

MCI_PLAY12F75V.

Starts transmitting output data.

recordO3IFU

MCI_RECORDBEWKAT

Starts recording input data.

resumeOCOAV

MCI_RESUMEBF.Q.U

Resumes playing or recording on a paused device.

saveUDLDV7

MCI_SAVE1OOEUW8

Saves data to a disk file.

seekUDLHE_

MCI_SEEK12F9YYY

Seeks forward or backward.

set.B6AA3

MCI_SETBO5DNC

Sets the operating state of the device.

status3L25TX

MCI_STATUSCTUPE8

Obtains status information about the device. This is also a required command; since some of its flags are not required, it is also listed here. (The optional items support devices that use linear media with identifiable positions.)

stopUDLWOB

MCI_STOP1OOF_PC

Stops playing.

 

If a driver supports a basic command, it must also support a standard set of flags for the command.

Extended Commands

Some MCI devices have additional commands, or they add flags to existing commands. While some extended commands apply only to a specific device driver, most of them apply to all drivers of a particular device type. For example, the command set for the sequencer device type extends the set.B6AA3 (MCI_SETBO5DNC) command to add time formats that are needed by MIDI sequencers.

You should not assume that the device supports the extended commands or flags. You can use the capability14PJB2D (MCI_GETDEVCAPS8A0P0PJ) command to determine whether a specific feature is supported, and your application should be ready to deal with  unsupported command  or  unsupported function  return values.

The following extended commands are available with the listed device types.

String

Message

Device types

Description

configureXLL_7M

MCI_CONFIGURE77X6O6

digitalvideo

Displays a configuration dialog box.

cue.B61PO

MCI_CUEBO5534

digitalvideo, waveaudio

Prepares for playing or recording.

delete33RM_.P

MCI_DELETE4F5ACU

waveaudio

Deletes a data segment from the media file.

escape13DK0HK

MCI_ESCAPES28.W0

videodisc

Sends custom information to a device.

freeze364F_BP

MCI_FREEZE6RYAIU

overlay

Disables video acquisition to the frame buffer.

put1KTN_TS

MCI_PUTBO5B3C

digitalvideo, overlay

Defines the source, destination, and frame windows.

realize1A0R_WU

MCI_REALIZE721EMC

digitalvideo

Tells the device to select and realize its palette into a device context of the displayed window.

setaudio2CA1ZZ.

MCI_SETAUDIOV1AXUH

digitalvideo

Sets audio parameters for video.

setvideo2CUPZV.

MCI_SETVIDEO9.TY08

digitalvideo

Sets video parameters.

signal1S7H62

MCI_SIGNAL15S.IHA

digitalvideo

Identifies a specified position with a signal.

spin1GMXS5P

MCI_SPIN12F0031

videodisc

Starts the disc spinning or stops the disc from spinning.

stepUDLWEB

MCI_STEP12F0_Z3

digitalvideo, videodisc

Steps the play one or more frames forward or reverse.

unfreezeL63G89

MCI_UNFREEZE15B.CNJ

overlay

Enables the frame buffer to acquire video data.

update1CAL0LK

MCI_UPDATEEPX_CU

digitalvideo

Repaints the current frame into the device context.

where4V_3I1

MCI_WHEREM3KM0X

digitalvideo, overlay

Obtains the rectangle specifying the source, destination, or frame area.

window1E0V_H2

MCI_WINDOW4JVT_JF

digitalvideo, overlay

Controls the display window.